<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="grid-select">
                <div class="select-group">
                    <span>案例类型：</span>
                    <select class="select-grid select-qtypeid" style="width: 100px;" >
                        <option value="0">请选择</option>
                        <option v-for="(type, index) of caseTypes" :key="index" :value="type.id">{{type.typeName}}</option>
                    </select>
                </div>
            </div>
            <#if shiro.hasPermission("product:productcaseinfo:list")>
            <a class="btn btn-default" @click="query">查询</a>
            </#if>
			<#if shiro.hasPermission("product:productcaseinfo:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("product:productcaseinfo:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("product:productcaseinfo:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-2 control-label">案例类型:</div>
                        <div class="col-sm-10">
                            <select class="select-grid select-caseType" style="width: 373px;">
                                <option value="0">请选择</option>
                                <option v-for="(type, index) of caseTypes" :key="index" :value="type.id">{{type.typeName}}</option>
                            </select>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">位置</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="productCaseInfo.position" placeholder="位置"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">风格</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="productCaseInfo.style" placeholder="风格"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">效果图:</div>
                        <!-- 按钮 -->
                        <div id="btnContainerCase" class="uploader_btn">选择文件</div>
                        <div id="uploader" class="wu-example">
                            <!-- 保存文件 -->
                            <div id="thelist" class="uploader-list">

                                <div v-for="(pic, index) of picList" class="img_list" :id="pic.id">
                                    <div>
                                        <img :layer-src="src+pic.picAddress" :src="src+pic.picAddress" @click="xmTanUploadImg">
                                    </div>
                                    <span class="close_Img">X</span>
                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="form-group">
                                <div class="col-sm-2 control-label">案例视频:</div>
                                <!-- 按钮 -->
                                <div id="btnContainerCaseVideo" >选择文件</div>
                                <div id="uploaderVideo" class="wu-example">
                                    <!-- 保存文件 -->
                                    <div id="thelistVideo">

                                    </div>
                                </div>

                            </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/product/productcaseinfo.js?_${.now?long}"></script>
</body>
<style>
    #thelist {padding-left: 123px;width:1000px;}
    #btnContainerCase div:nth-child(2){width: 100%!important;height:100%!important;}
    #thelistVideo {padding-left: 123px;width:1000px;}
    #btnContainerCaseVideo div:nth-child(2){width: 100%!important;height:100%!important;}
</style>
</html>